<?php
/**
 * You can override all dkret3 helper functions (those wrapped in a function_exists() call)
 * by defining them first in this functions.php file.
 * Simply copy the desired function from 'dkret3/library/extensions/core.php' to this theme's
 * functions.php, so the child theme functions would be used.
 *
 * Or remove added functions by using remove_action() or remove_filter() and attach
 * your own function to the hook.
 *
 * For more information on hooks, see http://codex.wordpress.org/Plugin_API.
 *
 * Because entry-title, entry-meta-before, entry-meta, comment-meta informations use
 * easy to change shortcodes and are filtered, you can change them inside your child theme:
 *
 * <code>
 * add_filter( 'dkret_entry_title', 'my_dkret_entry_title' );
 * 
 * function my_dkret_entry_title() {
 *    return '[entry-title]';
 * }
 * </code>
 *
 * You can add html code and/or use some of the following shortcodes for your convenience:
 * [separator]
 * [entry-calendar], [entry-title], [entry-author], [entry-published]
 * [entry-categories], [entry-tags], [entry-comments], [entry-edit-link],
 * 
 * For comment-meta use the following shortcodes:
 * [comment-author], [comment-published], [comment-permalink],
 * [comment-reply-link], [comment-edit-link]
 * 
 * Have a look at dkret_title(), dkret_entry_meta_before(), dkret_entry_meta() and dkret_footer_text()
 * at the beginning of 'dkret3/library/functions/shortcode.php' to see the default settings.
 *
 * For further informations about Child Themes, see http://codex.wordpress.org/Child_Themes
 *
 * @package dkret3
 * @subpackage my-dkret3
 * @since 3.6
 */

/**
 * Register support for the Wordpress Header Image API.
 * 
 * Child-Themes can various constants to change the display of their header image
 *
 * <code>
 * define( 'NO_HEADER_TEXT', true ); // Hide site title and site description text (default - true)
 * define( 'HEADER_IMAGE_HEIGHT', 140 ); // Crop uploaded images height to 140 pixels (default - 160)
 * define( 'HEADER_IMAGE_WIDTH', 960 ); // Crop uploaded images width to 820 pixels (default - 960)
 * define( 'HEADER_IMAGE', get_stylesheet_directory_uri() .'/library/images/header.jpg' ); set header.jpg as the new default header
 * </code>
 * 
 * Child Themes can register further header images and header-thumbnails with the
 * register_default_headers() function.
 *
 * For more information about the WordPress Header Image API, see 
 * http://codex.wordpress.org/Function_Reference/add_custom_image_header
 */
register_default_headers( array (
    'my-tournesol' => array (
        'url' => get_stylesheet_directory_uri() .'/library/images/my-tournesol.jpg',
        'thumbnail_url' => get_stylesheet_directory_uri() .'/library/images/my-tournesol-thumbnail.jpg',
        'description' => 'My Tournesol' ) ) 
);

define( 'HEADER_IMAGE', get_stylesheet_directory_uri() .'/library/images/my-tournesol.jpg' );
define( 'NO_HEADER_TEXT', true );

/**
 * You can remove parent theme hooks only after they are attached, which means you need to
 * attach my_dkret_setup() to the 'after_setup_theme' hook.
 *
 * Add your hooks inside this function to call them after the dkret3 theme framework is
 * already setup.
 * 
 * @package dkret3
 * @subpackage my-dkret3
 * @since 3.6
*/
function my_dkret_setup() {
    add_filter( 'dkret_attachment_image_size', 'my_dkret_attachment_size' );
}

// call my_dkret_setup() after setting up the dkret3 theme
add_action( 'after_setup_theme', 'my_dkret_setup' );

function my_dkret_attachment_size() {
    return array( 500, 500 );
}
?>